package com.springboot.controller;

import com.springboot.common.Result;
import com.springboot.entity.Category;
import com.springboot.service.SideConditionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "副条件管理",value = "类型管理")
@RestController
@RequestMapping("/shop")
public class SideConditionController {

    @Autowired
    SideConditionService service;

    @ApiOperation(value = "商品类别",httpMethod ="GET")
    @GetMapping("/SearchCategory")
    public Result SearchCateGory(){
        List<Category> categories= service.SearchCateGory();
        return Result.success("品牌类型如下所示:",categories);
    }
}
